#define _CRT_SECURE_NO_WARNINGS 1

#include <stdio.h>
#include <stdlib.h>

//yo|uar|e**|b|e***au|tifu|l
int countAsterisks(char* s) {
    int count = 0;
    int ret = 0;
    while (*s)
    {
        if (*s == '*' && count == 0)
        {
            ret++;
        }
        if (*s == '|')
        {
            count++;
        }
        if (*s == '|' && count % 2 == 0)
        {
            s++;
            while (*s != '|' && *s != '\0')
            {
                if (*s == '*')
                {
                    ret++;
                }
                s++;
            }
            if (*s == '|')
            {
                count++;
            }
        }
        if (*s != '\0')
        {
            s++;
        }
    }
    return ret;
}
int main()
{
    //char arr[100] = "l|*e*et|c**o|*de|";
    //char arr[100] = "iamprogrammer";
    char arr[100] = "*||*|||||*|*|***||*||***|";


    int ret = countAsterisks(arr);
    printf("%d\n", ret);
    return 0;
}